package com.hjd.shop.constant;

/**
 * Created with IntelliJ IDEA.
 *
 * @author 胡江迪
 * Date: 2020/10/13 0013
 * Time: 22:46
 * Description:返回状态码
 */
public enum ShopCode {
    SHOP_SUCCESS(true,"成功","10000"),
    SHOP_FILED(false,"失败","20000"),
    GOODS_NOT_EXIST(false,"商品不存在","20001"),
    USER_NOT_EXIST(false,"用户不存在","20002"),
    ORDER_NOT_RIGHT(false,"订单金额不合法","20003"),
    GOODS_NUMS_NOT_RIGHT(false,"商品数量不合法","20004"),
    SHOP_ORDER_NOT_CONFIRM(null,"订单未确认","0"),
    SHOP_ORDER_CONFIRM(null,"订单已确认","1"),
    SHOP_ORDER_CANCEL(null,"订单已取消","2"),
    USER_MONET_AMOUNT_NOT_ENOUGH(false,"账户余额不足","20005"),
    COUPON_NOT_EXIST(false,"优惠券不存在","20006"),
    COUPON_IS_USED(false,"优惠券已经使用","20007"),
    GOODS_NUMBER_NOT_ENOUGH(false,"商品库存不足","20008"),
    REFUND_LOG_NOT_EXIST(false,"无效退款，并无付款日志记录","20009"),
    ORDER_IS_PAYED(null,"订单已支付","20010"),
    ARGS_IS_NOT_EXIT(null,"参数不合法","20011");
    private Boolean state;
    private String msg;
    private String code;

    public Boolean getState() {
        return state;
    }

    ShopCode(Boolean state) {
        this.state = state;
    }

    ShopCode(String msg) {
        this.msg = msg;
    }

    ShopCode(Boolean state, String msg, String code) {
        this.state = state;
        this.msg = msg;
        this.code = code;
    }

    public void setState(Boolean state) {
        this.state = state;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
